package com.youyi.yychosesdk;

import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import com.youyi.yychosesdk.Builder.AlbumBuilder;
import com.youyi.yychosesdk.engine.ImageEngine;
import com.youyi.yychosesdk.models.album.AlbumModel;
import com.youyi.yychosesdk.utils.bitmap.BitmapUtils;
import com.youyi.yychosesdk.utils.bitmap.SaveBitmapCallBack;
import com.youyi.yychosesdk.utils.media.MediaScannerConnectionUtils;
import java.io.File;
import java.util.List;

public class EasyPhotos {
    public static final String RESULT_PHOTOS = "keyOfEasyPhotosResult";
    public static final String RESULT_SELECTED_ORIGINAL = "keyOfEasyPhotosResultSelectedOriginal";

    public static void preLoad(Context context) {
        AlbumModel.getInstance().query(context, null);
    }

    public static void preLoad(Context context, AlbumModel.CallBack callBack) {
        AlbumModel.getInstance().query(context, callBack);
    }

    public static AlbumBuilder createCamera(Activity activity, boolean z) {
        return AlbumBuilder.createCamera(activity).setUseWidth(z);
    }

    public static AlbumBuilder createCamera(Fragment fragment, boolean z) {
        return AlbumBuilder.createCamera(fragment).setUseWidth(z);
    }

    public static AlbumBuilder createCamera(FragmentActivity fragmentActivity, boolean z) {
        return AlbumBuilder.createCamera(fragmentActivity).setUseWidth(z);
    }

    public static AlbumBuilder createAlbum(Activity activity, boolean z, boolean z2, ImageEngine imageEngine) {
        return AlbumBuilder.createAlbum(activity, z, imageEngine).setUseWidth(z2);
    }

    public static AlbumBuilder createAlbum(Fragment fragment, boolean z, boolean z2, ImageEngine imageEngine) {
        return AlbumBuilder.createAlbum(fragment, z, imageEngine).setUseWidth(z2);
    }

    public static AlbumBuilder createAlbum(FragmentActivity fragmentActivity, boolean z, boolean z2, ImageEngine imageEngine) {
        return AlbumBuilder.createAlbum(fragmentActivity, z, imageEngine).setUseWidth(z2);
    }

    public static void recycle(Bitmap bitmap) {
        BitmapUtils.recycle(bitmap);
    }

    public static void recycle(Bitmap... bitmapArr) {
        BitmapUtils.recycle(bitmapArr);
    }

    public static void recycle(List<Bitmap> list) {
        BitmapUtils.recycle(list);
    }

    public static Bitmap addWatermark(Bitmap bitmap, Bitmap bitmap2, int i, int i2, int i3, boolean z, int i4) {
        return BitmapUtils.addWatermark(bitmap, bitmap2, i, i2, i3, z, i4);
    }

    public static Bitmap addWatermarkWithText(Bitmap bitmap, Bitmap bitmap2, int i, String str, int i2, int i3, boolean z, int i4) {
        return BitmapUtils.addWatermarkWithText(bitmap, bitmap2, i, str, i2, i3, z, i4);
    }

    public static void saveBitmapToDir(Activity activity, String str, String str2, Bitmap bitmap, boolean z, SaveBitmapCallBack saveBitmapCallBack) {
        BitmapUtils.saveBitmapToDir(activity, str, str2, bitmap, z, saveBitmapCallBack);
    }

    public static Bitmap createBitmapFromView(View view) {
        return BitmapUtils.createBitmapFromView(view);
    }

    public static void notifyMedia(Context context, String... strArr) {
        MediaScannerConnectionUtils.refresh(context, strArr);
    }

    public static void notifyMedia(Context context, File... fileArr) {
        MediaScannerConnectionUtils.refresh(context, fileArr);
    }

    public static void notifyMedia(Context context, List<String> list) {
        MediaScannerConnectionUtils.refresh(context, list);
    }
}
